<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>gotoorder</title>
		<link rel="stylesheet" href="./Public/Home/css/index.css" />
		<link rel="stylesheet" href="./Public/Home/css/common.css" />
		<link rel="stylesheet" href="./Public/Home/css/login.css" />
		<link rel="stylesheet" href="./Public/Home/css/gotoorder.css" />
		<script src="./Public/Home/js/jquery-1.7.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="./Public/Home/js/common.js" type="text/javascript" charset="utf-8"></script>
<script src="./Public/Home/js/area.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		{{include file="VIEW_PATH/Common/header.php"}}
		<div id="gotoorder">
			<div class="gotoorder">
				<div class="content mall_head">
					<div class="cont">
						
						<div class="mall_c">
							<div class="hd">
								<h3>收货地址</h3>
								<span class="red">温馨提示：为了保证您的权益，防止黄牛倒卖，订单进入正在配货状态将不能修改收货地址和发票信息！</span>
							</div>
							<div class="bd">
								<div class="addbox">
									<div class="addbox_cont">
<!--//										<?php  ?>-->
										{{foreach from = "$address" key="$k" value="$v"}}
										<div class="oldads">
											<span class="edit"><a href="">编辑</a></span>
											<i class="input_radio_view shi"></i>
											<input type="radio" name="oldadds" id="" class="input_radio" value="" uid="{{$v['ad_uid']}}"/><span class="adds">{{$v['ad_consignee']}}，{{$v['ad_address']}}{{$v['ad_detail']}}，{{$v['ad_phone']}} </span>
										</div>
										{{endforeach}}
										<div class="oldads newads">
											<i class="input_radio_view kong"></i>
											<input type="radio" name="" id="" class="input_radio" value="" /><span class="adds">使用新地址 </span>
										</div>
									    <a href="javascript:void(0);" class="add_btn " id="add_newadds"></a>
									    
<script type="text/javascript">
$(function(){
									    			//点击保存
	$(".add_btn_green").click(function(){

        var consignee = $("input[name=ad_consignee]").val();
        var sheng = $("select[name=ad_sheng]").val();
        var shi = $("select[name=ad_shi]").val();
        var qu = $("select[name=ad_qu]").val();
        var address = sheng+','+shi+','+qu;
       var detail =  $("textarea[name=ad_detail]").val();
       var pc =  $("input[name=ad_PC]").val();
       var phone = $("input[name=ad_phone]").val();
//     alert(phone);
       $.ajax({
       	type:"post",
       	url:"{{U('Addaddress')}}",
      data:{consignee:consignee,address:address,detail:detail,pc:pc,phone:phone},
       dataType:'json',
       success:function(data){
       	$(".add_adds").hide();
       	
       		
       }
       
       
       });

	})
})
</script>
						<form action="{{U('Addaddress')}}" method="post">
									    <div class="add_adds newads">
									    	<!--收货收货人姓名-->
									    	<div class="add_rows">
									    		<label class="addlabel">
									    			<b>*</b>收货人姓名
									    		</label>
									    <input type="text" required name="ad_consignee" class="addtext" placeholder="收货人姓名" /></div>
									    <!--收货地址-->
									    <div class="add_rows mt_10">
									    		<label class="addlabel">
									    			<b>*</b>地址
	<script type="text/javascript">
		$(function(){
			//初始化方法
			area.init('area');
			//修改的时候默认被选中效果
			area.selected('黑龙江','哈尔滨','道里区');
		})
	</script>
	<select name="ad_sheng" id="area1">
		
	</select>
	<select name="ad_shi" id="area2">
		
	</select>
	<select name="ad_qu" id="area3">
		
	</select>
	<textarea name="ad_detail" class="add_area"  placeholder="路名或街道地址，门牌号" >
									   </textarea>
									    </div>
									    <!--邮政编码-->
									    
									    	<div class="add_rows  mt_10">
									    		<label class="addlabel">
									    			<b></b>邮政编码
									    		</label>
									    <input type="text" name="ad_PC" class="addtext" placeholder="6位邮政编码" /></div>
									    <!--手机号码-->
									    <div class="add_rows  mt_10">
									    		<label class="addlabel">
									    			<b>*</b>手机号码
									    		</label>
								<input type="hidden" name="ad_uid"  value="{{$_SESSION['uid']}}" />
								<input type="text"name="ad_phone" class="addtext" placeholder="11位手机号" /></div>
									    <!--保存提交-->
						<div class="add_rows  mt_10">
								<p class="mt_20">
						
							<a href="javascript:void(0);" class="add_btn_green store">保存</a>		    		
							<a href="javascript:void(0);" class="add_btn_grey">取消</a>
									    	</p>
									    		</div>
									</div>
									</form>	
								</div>
							</div>
						</div>
					</div>	
				
					
					 <!--支付方式-->
					 <div class="mall_c">
							<div class="hd">
								<h3>支付方式</h3></div>
							<div class="bd">
								<div class="bd_cont">
									<div class="forin">
										<div class="eleradio">
											<i class="rdo_view yuan"></i>
											<input type="radio" name="" id="" class="rdo" value="" /><label>在线支付</label>
										</div>
									 
									</div>
								</div>
							</div>
					</div>
					<!--配送方式-->
					 <div class="mall_c">
							<div class="hd">
								<h3>配送方式</h3></div>
							<div class="bd">
								<div class="bd_cont">
									<div class="forin">
										<div class="eleradio">
											<i class="rdo_view yuan"></i>
											<input type="radio" name="" id="" class="rdo" value="" /><label>免费配送</label>
										</div>
									</div>
								</div>
							</div>
					</div>
				<!--发票信息-->
				 <div class="mall_c">
							<div class="hd">
								<h3>发票信息</h3></div>
							<div class="bd">
								<div class="bd_cont">
									<div class="forin">
										<div class="eleradio radios">
											<i class="rdo_view yuan"></i>
											<input type="radio" name="" id="" class="rdo" value="" /><label>不开发票</label>
										</div>
										<div class="eleradio radios">
											<i class="rdo_view yuan kongy"></i>
											<input type="radio" name="" id="" class="rdo" value="" /><label>普通发票</label>
										</div>
									 
									</div>
								</div>
							</div>
					</div>
					<!--商品清单-->
					<div class="mall_c">
							<div class="hd">
								<h3>商品清单</h3></div>
							<div class="bd">
								<div class="goodlist">
									<div class="title">
                            <div class="t1">商品信息</div>
							<div class="t2">单价</div>
							<div class="t3">数量</div>
							<div class="t4">合计</div>
							
						</div>
							    <div class="g_cont">
							    	
							    	{{foreach from="$data" key="$k" value="$v"}}
					    	<div class="warp_row">
					    		<div class="g1">
					    			<img src="{{$v['g_pic']}}" alt="" />
					    			<span >{{$v['name']}}</span>
					    		</div>
					    		<div class="g2">
					    			<span>¥{{$v['price']}}</span>元
					    		</div>
					    		<div class="g3">
					    			x<span>{{$v['num']}}</span>
					    		</div>
					    		
					    		<div class="g4">
					    			<span>¥{{$v['price']}}</span>
					    		</div>
					    		
					    	</div>
					    	
					    	{{endforeach}}
					    </div>
						  <!--列表部分-->
							<div class="total">
								<ul>
									<li>共<span class="red"><?php if(empty($_SESSION['cart']['goods'])){  ?>0<?php  }else{ ?>{{$v['total_rows']}}<?php } ?></span>件</li>
									<li>金额合计：<span><?php if(empty($_SESSION['cart']['goods'])){  ?>0<?php  }else{ ?>{{$v['sum']}}<?php } ?></span>元</li>
									<li>优惠金额：<span>-0.00</span>元</li>
									<li>配送费：<span>0</span>元</li>
									<li class="blod">应付总额：<span class="red"><?php if(empty($_SESSION['cart']['goods'])){  ?>0<?php  }else{ ?>{{$v['sum']}}<?php } ?></span>元</li>
                               </ul>
							</div>	
						     <!--优惠吗-->
						     <div class="bd_yh">
						     	<div class="cont">
						     		<div class="cont_title">使用优惠码
						     		 <span>
						     		 	<i></i>
						     		 </span>
						     		</div>
						     	
						    <div class="use">
						    	<div class="yhinput">
						    		优惠码：
						    		<input type="text" />
						    	</div>
						    	<p><a href="" class="use_btn">立即使用</a></p>
						     </div>
						    </div>
						     </div>
						</div>
					<!--寄送地址-->
							<div class="sendto">
								<p>寄送至：北京 北京市 朝阳区 孙河顺白路12号</p>
								<p>谢方方 (收件人) 13146616176 </p>
								<a href="{{U('Pay/add')}}" class="xiadan">立即下单</a>
							</div>
							</div>
					</div>
			</div>
		</div></div></div>
{{include file="VIEW_PATH/Common/footer.php"}}
<!--登录页面-->
{{include file="VIEW_PATH/Common/login.php"}}
<!--注册页面-->
{{include file="VIEW_PATH/Common/register.php"}}
		<!--右侧固定定位-->
{{include file="VIEW_PATH/Common/guright.php"}}
	</body>
</html>
